<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            /* border: 10px solid red; */
            display: inline-block;
            border-width: 10px;
            padding: 10px;
            box-sizing:content-box;
            background-repeat: no-repeat;
            background-size: 98%;
            background-position: 2%;
            
        }
        .div1{
            /* background-image: url('../img/快乐加倍.png'); */
            border-style: dotted;
            border-color:red ;
           
        }
        .div2{
            background-image: url('../img/redbtn.png');
            border-style: double;
            border-color:blue ;
        }
        .div3{
            background-image: url('../img/快乐加倍.png');
            border-style: dashed;
            border-color:green ;
        }

    </style>
</head>
<body>
    <div  class="div1">
        <img src="../img/快乐加倍.png" width="100%" height="100%"/>
    </div>

    <div class="div2">
        div2
    </div>
    <div  class="div3">
        div3
    </div>

</body>
</html>